import React from 'react'
import { Navigate } from 'react-router-dom'

export default function privateRoute(props) {
    const isLogin = sessionStorage.getItem("token")
  return (
    isLogin?props.element:<Navigate to="/login"></Navigate>
  )
}
